# -*- coding: utf-8 -*-

<%def name="link_to(machine, attribute=None)">
% if machine:
<a href="${h.url_for('machine', id=machine.id)}">
  % if attribute is None:
   ${machine.hostname|h} ${machine.macaddress|h}
  % else:
   ${getattr(machine, attribute)|h}
  % endif
</a>
% else:
  -
% endif
</%def>


<%def name="status(machine, dom_onLoad=None, redo=60000)">
  % if machine:
    <img src="/img/busy.gif" title="PING" class="pingmachine" 
         id="ping${machine.id}" alt="PING status"/>
  % endif
</%def>
